<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>组件</title>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	</head>
	<body>
		<div id="stu">
			<zh v-for='st in  study'v-bind:bd='st'></zh>
			
			
		</div>
		<script>
			//注意props 属性后面接数组格式
			Vue.component('zh',{
				//
				props:["bd"],
				template:'<li>{{bd}}</li>'
			})
			var vm =new Vue({
				el:"#stu",
				data:{
					study:["书籍","书籍2"]
				}
			})
		</script>
		
		
	</body>


</html>
